﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.CopsBanditsUI {
    import flash.display.*;
    import flash.geom.*;
    import flash.utils.*;
    import Display.DialogUI.*;
    import Classes.util.*;
    import com.greensock.*;

    public class CopsDialog extends GenericDialog {

        public static const TAB_OFFICERS:int = 0;
        public static const TAB_BANDITS:int = 1;
        public static const TAB_UPGRADES:int = 2;
        public static const STATS_TAB_NAMES:Array = ["officers_tab", "bandits_tab", "upgrades_tab"];

        public static var DEFAULT_TAB:int = 0;
        public static var assetDict:Dictionary = new Dictionary();

        public function CopsDialog(){
            super("", "", 0, null, "BanditsUI");
        }
        override protected function loadAssets():void{
            Global.delayedAssets.get(DelayedAssetLoader.TABBED_ASSETS, makeAssets);
        }
        override protected function showTween():void{
            this.mouseEnabled = (this.mouseChildren = false);
            this.centerPopup();
            m_content.alpha = 0;
            m_content.scaleX = (m_content.scaleY = 1);
            TweenLite.to(m_content, TWEEN_TIME, {
                alpha:1,
                onComplete:onShowComplete
            });
        }
        override public function centerPopup():void{
            var _local1:Rectangle;
            var _local2:Point;
            var _local3:Number;
            if (parent){
                _local1 = Global.hud.getRect(parent);
                _local2 = new Point(((Global.stage.stageWidth - m_content.width) / 2), ((Global.stage.stageHeight - m_content.height) / 2));
                _local3 = Global.hud.localToGlobal(new Point(Global.hud.x, Global.hud.y)).x;
                this.x = (_local2.x - _local3);
                this.y = _local2.y;
            };
        }
        override protected function createAssetDict():Dictionary{
            assetDict["dialog_bg"] = (new m_comObject.conventionCenter_bg() as DisplayObject);
            assetDict["tab_unselected"] = m_comObject.police_tab_unselected;
            assetDict["tab_selected"] = m_comObject.police_tab_selected;
            assetDict["inner_top"] = m_comObject.conventionCenter_innerArea_round;
            assetDict["inner_undertab"] = m_comObject.conventionCenter_innerArea_flatTop;
            assetDict["conventionCenter_pagination_border"] = m_comObject.conventionCenter_pagination_border;
            assetDict["conventionCenter_pagination_bottom_disabled"] = m_comObject.conventionCenter_pagination_bottom_disabled;
            assetDict["conventionCenter_pagination_bottom_over"] = m_comObject.conventionCenter_pagination_bottom_over;
            assetDict["conventionCenter_pagination_bottom_up"] = m_comObject.conventionCenter_pagination_bottom_up;
            assetDict["conventionCenter_pagination_dot"] = m_comObject.conventionCenter_pagination_dot;
            assetDict["conventionCenter_pagination_top_disabled"] = m_comObject.conventionCenter_pagination_top_disabled;
            assetDict["conventionCenter_pagination_top_over"] = m_comObject.conventionCenter_pagination_top_over;
            assetDict["conventionCenter_pagination_top_up"] = m_comObject.conventionCenter_pagination_top_up;
            assetDict["police_checkmark"] = m_comObject.police_checkmark;
            assetDict["police_innerBorder"] = m_comObject.police_innerBorder;
            assetDict["police_nextButton_down"] = m_comObject.police_nextButton_down;
            assetDict["police_nextButton_over"] = m_comObject.police_nextButton_over;
            assetDict["police_nextButton_up"] = m_comObject.police_nextButton_up;
            assetDict["police_prevButton_down"] = m_comObject.police_prevButton_down;
            assetDict["police_prevButton_over"] = m_comObject.police_prevButton_over;
            assetDict["police_prevButton_up"] = m_comObject.police_prevButton_up;
            assetDict["police_rewardBG_center_blue"] = m_comObject.police_rewardBG_center_blue;
            assetDict["police_rewardBG_center_disabled"] = m_comObject.police_rewardBG_center_disabled;
            assetDict["police_rewardBG_center_white"] = m_comObject.police_rewardBG_center_white;
            assetDict["police_rewardBG_left_blue"] = m_comObject.police_rewardBG_left_blue;
            assetDict["police_rewardBG_left_disabled"] = m_comObject.police_rewardBG_left_disabled;
            assetDict["police_rewardBG_left_white"] = m_comObject.police_rewardBG_left_white;
            assetDict["police_rewardBG_right_blue"] = m_comObject.police_rewardBG_right_blue;
            assetDict["police_rewardBG_right_disabled"] = m_comObject.police_rewardBG_right_disabled;
            assetDict["police_rewardBG_right_white"] = m_comObject.police_rewardBG_right_white;
            assetDict["police_scrollContainer"] = m_comObject.police_scrollContainer;
            assetDict["rewardCard_locked"] = m_comObject.police_rewardCard_locked;
            assetDict["rewardCard_unlocked"] = m_comObject.police_rewardCard_unlocked;
            assetDict["police_officerPortrait"] = m_comObject.police_officerPortrait;
            assetDict["police_bandit"] = m_comObject.police_bandit;
            assetDict["police_arrow"] = m_comObject.police_arrow;
            assetDict["police_doughnut_disabled"] = m_comObject.police_doughnut_disabled;
            assetDict["police_doughnut_empty"] = m_comObject.police_doughnut_empty;
            assetDict["police_doughnut"] = m_comObject.police_doughnut;
            assetDict["police_checkmarkBig"] = m_comObject.police_checkmarkBig;
            assetDict["police_slot_locked"] = m_comObject.police_slot_locked;
            assetDict["police_slot_unfilled"] = m_comObject.police_slot_unfilled;
            assetDict["police_divider"] = m_comObject.police_divider;
            return (assetDict);
        }
        override protected function createDialogView(_arg1:Dictionary):GenericDialogView{
            return (new CopsDialogView(_arg1, m_message, m_title, m_type, m_callback));
        }
        override protected function onShow():void{
            super.onShow();
            Global.ui.mouseEnabled = true;
            Global.ui.mouseChildren = true;
        }

    }
}//package Display.CopsBanditsUI 
